<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        function doChange(flag){
            var logo=document.getElementById("logo");
            if(flag=="mi"){
                logo.src="../images/mi.png";
            }else if(flag=="yan"){
                logo.src="../images/yan.png";
            }else{
                logo.src="../images/fei.png";
            }
        }
    </script>
</head>
<body>
    <input type="radio" value="yangmi"  name="idol" id="mi" checked onclick="doChange('mi')"><label for="mi">杨幂</label>
    <input type="radio" value="tangyan"  name="idol" id="yan" onclick="doChange('yan')"><label for="yan">唐嫣</label>
    <input type="radio" value="liuyifei"  name="idol" id="fei" onclick="doChange('fei')"><label for="fei">刘亦菲</label>
    <div>
        <img src="../images/mi.png" alt="" id="logo">
    </div>
</body>
</html>